<link rel="stylesheet" href="basics.css">
<div id="container"></div>
<script src="../../dist/DragSelect.js"></script>
<script>
    window.selected = [];

    for (var i = 0; i < 25000; i++) {
        var child = document.createElement("button");
        child.appendChild(document.createTextNode(i));
        child.classList.add("generated-item", "item");
        child.id = `item-${i}`;
        document.querySelector('#container').appendChild(child);
    }

    const ds = new DragSelect({
        selectables: document.querySelectorAll('.generated-item'),
        draggability: false,
    });
    ds.subscribe('DS:end', ({items}) => window.selected = items.map(item => item.id))

</script>
